<template>
	<view>
		<view class="smsLoginBox">
			<view class="li">
				<view class="phone">+86</view>
				<input type="tel" maxlength="11" v-model="form.phone" placeholder="输入手机号"/>
			</view>
			<view class="li code">
				<input type="password" v-model="form.password" placeholder="输入密码"/>
<!--				<view @click="getCode">{{ sendTxt }}</view>-->
			</view>
			<view class="btnSubmit china-btn-bg" @click.stop="toLogin">登录</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				form:{
					phone:'',
					password:'',
					isParty:false,
					partyData:[]
				},
				sendTxt:'获取验证码',
			}
		},
		methods: {
			toLogin(){
        let that = this
        uni.showLoading()
        that.$http.loginStaff({
          ...that.form,
        }).then(res=>{
          uni.setStorageSync('userInfo',res);
          uni.reLaunch({
            url:'/pages/index/index'
          })
        })

			},
			getCode(){

			},
			agreeAgreement(e) {
				if (e.detail.value.length > 0) {
					this.agree = true;
				} else {
					this.agree = false;
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
.smsLoginBox {
	margin-top: 120upx;
	padding: 0 60rpx;

	.user {
		display: flex;
		align-items: center;
		justify-content: flex-end;

		image {
			height: 100rpx;
			width: 100rpx;
			border-radius: 100rpx;
			border: 1rpx solid #eee;
			margin-left: 20rpx;
		}
	}

	.title {
		font-weight: 600;
		color: #999;
	}

	.li {
		background: #eee;
		height: 90rpx;
		border-radius: 90rpx;
		margin: 30rpx 0;
		display: flex;
		align-items: center;
		padding: 0 30rpx;
		color: #666;

		.phone {
			padding-right: 20rpx;
		}
	}

	.code {
		justify-content: space-between;
		font-size: 30rpx;

		input {
			width: 60%;
		}
	}

	.btnSubmit {
		height: 90rpx;
		line-height: 90rpx;
		text-align: center;
		border-radius: 90rpx;
		margin: 50rpx 0;
	}
}
</style>
